<?xml version="1.0" encoding="utf-8" ?>
<ArrayOfTransitionRule xmlns="http://schemas.ScrumForTeamSystem.com/TransitionService/RulesCollection">
  <!-- Release target rules - start -->
  <TransitionRule>
    <WorkItemTypeName source="Release" target="Release" />
    <Transition field="System.IterationPath" from="*" to="*" />
    <LinkType target="Self" />
    <ChangeNote>The iteration path has changed.</ChangeNote>
    <EligibleTargetStates>
      <State>Viable</State>
      <State>Deleted</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.Title" type="Expression">System.IterationPath</Replacement>
    </Replacements>
  </TransitionRule>
  <!-- Release target rules - end -->

  <!-- Sprint target rules - start -->
  <TransitionRule>
    <WorkItemTypeName source="Sprint" target="Sprint" />
    <Transition field="System.IterationPath" from="*" to="*" />
    <LinkType target="Self" />
    <ChangeNote>The iteration path has changed.</ChangeNote>
    <EligibleTargetStates>
      <State>Not Started</State>
      <State>In Progress</State>
      <State>Done</State>
      <State>Aborted</State>
      <State>Deleted</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.Title" type="Expression">System.IterationPath</Replacement>
    </Replacements>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Team Sprint" target="Sprint" />
    <Transition field="System.State" from="*" to="In Progress" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>Work on an associated Team Sprint has commenced.</ChangeNote>
    <EligibleTargetStates>
      <State>Not Started</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">In Progress</Replacement>
    </Replacements>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Team Sprint" target="Sprint" />
    <Transition field="System.State" from="*" to="Done" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>Work on all associated Team Sprint(s) has completed.</ChangeNote>
    <EligibleTargetStates>
      <State>In Progress</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Done</Replacement>
    </Replacements>
    <SiblingConditions>
      <SiblingCondition comparison="All" field="System.State" link="Scrum.ImplementedBy" siblingtype="Team Sprint" value="Done">
        <ExcludedStates>
          <State>Deleted</State>
          <State>Aborted</State>
        </ExcludedStates>
      </SiblingCondition>
    </SiblingConditions>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Team Sprint" target="Sprint" />
    <Transition field="System.State" from="*" to="Aborted" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>All associated Team Sprint(s) have been aborted.</ChangeNote>
    <EligibleTargetStates>
      <State>In Progress</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Aborted</Replacement>
    </Replacements>
    <SiblingConditions>
      <SiblingCondition comparison="All" field="System.State" link="Scrum.ImplementedBy" siblingtype="Team Sprint" value="Aborted">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
    </SiblingConditions>
  </TransitionRule>
  <!-- Sprint target rules - end -->

  <!-- Team Sprint target rules - start -->
  <TransitionRule>
    <WorkItemTypeName source="Team Sprint" target="Team Sprint" />
    <Transition field="System.IterationPath" from="*" to="*" />
    <LinkType target="Self" />
    <ChangeNote>The iteration path has changed.</ChangeNote>
    <EligibleTargetStates>
      <State>Not Started</State>
      <State>In Progress</State>
      <State>Done</State>
      <State>Aborted</State>
      <State>Deleted</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.Title" type="Expression">System.IterationPath</Replacement>
    </Replacements>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Sprint" target="Team Sprint" />
    <Transition field="System.State" from="*" to="Aborted" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>The associated Sprint has been aborted.</ChangeNote>
    <EligibleTargetStates>
      <State>In Progress</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Aborted</Replacement>
    </Replacements>
  </TransitionRule>
  <!-- Team Sprint target rules - end -->

  <!-- Product Backlog Item target rules - start -->
  <TransitionRule>
    <WorkItemTypeName source="Product Backlog Item" target="Product Backlog Item" />
    <Transition field="Scrum.v3.BusinessValue" from="*" to="*" />
    <LinkType target="Self" />
    <ChangeNote>Return On Investment has changed.</ChangeNote>
    <EligibleTargetStates>
      <State>Not Started</State>
      <State>In Progress</State>
      <State>Done</State>
      <State>Descoped</State>
      <State>Broken</State>
      <State>Deprecated</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="Scrum.v3.ReturnOnInvestment" type="Expression" decimalplaces="2">Scrum.v3.BusinessValue / Microsoft.VSTS.Scheduling.StoryPoints</Replacement>
    </Replacements>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Product Backlog Item" target="Product Backlog Item" />
    <Transition field="Microsoft.VSTS.Scheduling.StoryPoints" from="*" to="*" />
    <LinkType target="Self" />
    <ChangeNote>Return On Investment has changed.</ChangeNote>
    <EligibleTargetStates>
      <State>Not Started</State>
      <State>In Progress</State>
      <State>Done</State>
      <State>Descoped</State>
      <State>Broken</State>
      <State>Deprecated</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="Scrum.v3.ReturnOnInvestment" type="Expression" decimalplaces="2">Scrum.v3.BusinessValue / Microsoft.VSTS.Scheduling.StoryPoints</Replacement>
    </Replacements>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Sprint Backlog Task" target="Product Backlog Item" />
    <Transition field="System.State" from="*" to="In Progress" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>Work has commenced on an associated task</ChangeNote>
    <EligibleTargetStates>
      <State>Not Started</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">In Progress</Replacement>
    </Replacements>
    <SiblingConditions />
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Product Backlog Item" target="Product Backlog Item" />
    <Transition field="Scrum.v3.WorkRemaining" from="0" to="*" />
    <LinkType target="Self" />
    <ChangeNote>Work has been added to a completed item.</ChangeNote>
    <EligibleTargetStates>
      <State>Done</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Broken</Replacement>
    </Replacements>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Sprint Backlog Task" target="Product Backlog Item" />
    <Transition field="System.State" from="*" to="Done" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>All tasks are complete, all tests have passed and all impediments are resolved.</ChangeNote>
    <EligibleTargetStates>
      <State>In Progress</State>
      <State>Broken</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Done</Replacement>
    </Replacements>
    <SiblingConditions>
      <SiblingCondition comparison="All" field="System.State" value="Done" siblingtype="Sprint Backlog Task" link="Scrum.ImplementedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Passed" siblingtype="Acceptance Test" link="Microsoft.VSTS.Common.TestedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Resolved" siblingtype="Impediment" link="Scrum.ImpededBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
    </SiblingConditions>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Sprint Backlog Task" target="Product Backlog Item" />
    <Transition field="System.State" from="*" to="Deleted" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>All tasks are complete, all tests have passed and all impediments are resolved.</ChangeNote>
    <EligibleTargetStates>
      <State>In Progress</State>
      <State>Broken</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Done</Replacement>
    </Replacements>
    <SiblingConditions>
      <SiblingCondition comparison="All" field="System.State" value="Done" siblingtype="Sprint Backlog Task" link="Scrum.ImplementedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Passed" siblingtype="Acceptance Test" link="Microsoft.VSTS.Common.TestedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Resolved" siblingtype="Impediment" link="Scrum.ImpededBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
    </SiblingConditions>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Acceptance Test" target="Product Backlog Item" />
    <Transition field="System.State" from="*" to="Passed" />
    <LinkType>Microsoft.VSTS.Common.TestedBy</LinkType>
    <ChangeNote>All tasks are complete, all tests have passed and all impediments are resolved.</ChangeNote>
    <EligibleTargetStates>
      <State>In Progress</State>
      <State>Broken</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Done</Replacement>
    </Replacements>
    <SiblingConditions>
      <SiblingCondition comparison="All" field="System.State" value="Done" siblingtype="Sprint Backlog Task" link="Scrum.ImplementedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Passed" siblingtype="Acceptance Test" link="Microsoft.VSTS.Common.TestedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Resolved" siblingtype="Impediment" link="Scrum.ImpededBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
    </SiblingConditions>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Acceptance Test" target="Product Backlog Item" />
    <Transition field="System.State" from="*" to="Deleted" />
    <LinkType>Microsoft.VSTS.Common.TestedBy</LinkType>
    <ChangeNote>All tasks are complete, all tests have passed and all impediments are resolved.</ChangeNote>
    <EligibleTargetStates>
      <State>In Progress</State>
      <State>Broken</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Done</Replacement>
    </Replacements>
    <SiblingConditions>
      <SiblingCondition comparison="All" field="System.State" value="Done" siblingtype="Sprint Backlog Task" link="Scrum.ImplementedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Passed" siblingtype="Acceptance Test" link="Microsoft.VSTS.Common.TestedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Resolved" siblingtype="Impediment" link="Scrum.ImpededBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
    </SiblingConditions>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Impediment" target="Product Backlog Item" />
    <Transition field="System.State" from="*" to="Resolved" />
    <LinkType>Scrum.ImpededBy</LinkType>
    <ChangeNote>All tasks are complete, all tests have passed and all impediments are resolved.</ChangeNote>
    <EligibleTargetStates>
      <State>In Progress</State>
      <State>Broken</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Done</Replacement>
    </Replacements>
    <SiblingConditions>
      <SiblingCondition comparison="All" field="System.State" value="Done" siblingtype="Sprint Backlog Task" link="Scrum.ImplementedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Passed" siblingtype="Acceptance Test" link="Microsoft.VSTS.Common.TestedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Resolved" siblingtype="Impediment" link="Scrum.ImpededBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
    </SiblingConditions>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Impediment" target="Product Backlog Item" />
    <Transition field="System.State" from="*" to="Deleted" />
    <LinkType>Scrum.ImpededBy</LinkType>
    <ChangeNote>All tasks are complete, all tests have passed and all impediments are resolved.</ChangeNote>
    <EligibleTargetStates>
      <State>In Progress</State>
      <State>Broken</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Done</Replacement>
    </Replacements>
    <SiblingConditions>
      <SiblingCondition comparison="All" field="System.State" value="Done" siblingtype="Sprint Backlog Task" link="Scrum.ImplementedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Passed" siblingtype="Acceptance Test" link="Microsoft.VSTS.Common.TestedBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
      <SiblingCondition comparison="All" field="System.State" value="Resolved" siblingtype="Impediment" link="Scrum.ImpededBy">
        <ExcludedStates>
          <State>Deleted</State>
        </ExcludedStates>
      </SiblingCondition>
    </SiblingConditions>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Acceptance Test" target="Product Backlog Item" />
    <Transition field="System.State" from="*" to="Failed" />
    <LinkType>Microsoft.VSTS.Common.TestedBy</LinkType>
    <ChangeNote>An associated test has failed.</ChangeNote>
    <EligibleTargetStates>
      <State>Done</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Broken</Replacement>
    </Replacements>
    <SiblingConditions />
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Impediment" target="Product Backlog Item" />
    <Transition field="System.State" from="*" to="Open" />
    <LinkType>Scrum.ImpededBy</LinkType>
    <ChangeNote>This item has been impeded.</ChangeNote>
    <EligibleTargetStates>
      <State>Done</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Broken</Replacement>
    </Replacements>
  </TransitionRule>
  <!-- Product Backlog Item target rules - end -->

  <!-- Sprint Backlog Task target rules - start -->
  <TransitionRule syncexcluded="true">
    <WorkItemTypeName source="Product Backlog Item" target="Sprint Backlog Task" />
    <Transition field="System.IterationPath" from="*" to="*" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>The associated backlog items iteration path has changed.</ChangeNote>
    <EligibleTargetStates>
      <State>Not Started</State>
      <State>In Progress</State>
      <State>Descoped</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.IterationPath" type="Expression">System.IterationPath</Replacement>
    </Replacements>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Product Backlog Item" target="Sprint Backlog Task" />
    <Transition field="System.State" from="*" to="Descoped" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>The associated backlog item has been descoped.</ChangeNote>
    <EligibleTargetStates>
      <State>Not Started</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Descoped</Replacement>
    </Replacements>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Product Backlog Item" target="Sprint Backlog Task" />
    <Transition field="System.State" from="Descoped" to="*" />
    <LinkType>Scrum.ImplementedBy</LinkType>
    <ChangeNote>The associated backlog item has been re-scoped.</ChangeNote>
    <EligibleTargetStates>
      <State>Descoped</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Not Started</Replacement>
    </Replacements>
  </TransitionRule>
  <!-- Sprint Backlog Task target rules - end -->

  <!-- Acceptance Test target rules - start -->
  <TransitionRule>
    <WorkItemTypeName source="Bug" target="Acceptance Test" />
    <Transition field="System.State" from="*" to="Active" />
    <LinkType>Scrum.FailedBy</LinkType>
    <ChangeNote>An associated bug has been actived.</ChangeNote>
    <EligibleTargetStates>
      <State>Ready for Test</State>
      <State>Passed</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Failed</Replacement>
    </Replacements>
  </TransitionRule>

  <TransitionRule>
    <WorkItemTypeName source="Bug" target="Acceptance Test" />
    <Transition field="System.State" from="Active" to="*" />
    <LinkType>Scrum.FailedBy</LinkType>
    <ChangeNote>All associated bugs are no longer active.</ChangeNote>
    <EligibleTargetStates>
      <State>Failed</State>
    </EligibleTargetStates>
    <Replacements>
      <Replacement targetfield="System.State" type="Specified">Ready for Test</Replacement>
    </Replacements>
    <SiblingConditions>
      <SiblingCondition comparison="All" field="System.State" link="Scrum.FailedBy" siblingtype="Bug" value="Closed">
        <ExcludedStates>
          <State>Deleted</State>
          <State>Ignored</State>
        </ExcludedStates>
      </SiblingCondition>
    </SiblingConditions>
  </TransitionRule>
  <!-- Acceptance Test target rules - end -->

</ArrayOfTransitionRule>
